<!DOCTYPE html>
<html>
{include file="head.html"}
<body>
 <div class="header">
 <div  class="left-btn goback"><span class="iconfont icon-back"></span></div>
 	<div class="title">留言添加</div>
 </div>
{include file="guest/nav.html"}
      <form method="post" action="index.php?m=guest&a=save">
        <input type="hidden" name="id" style="display:none;" value="{$data.id}" >
        <table class="table table-border-row"  width="100%">
          <tr>
            <td width="70">主题：</td>
            <td><input type="text" name="title" id="title" value="{$data.title}" ></td>
          </tr>
          <tr>
            <td>类型：</td>
            <td><select name="catid">
            	{foreach item=c key=k from=$catlist}
            	<option value="{$k}" {if $data.catid eq $k} selected="selected"{/if}>{$c}</option>
                {/foreach}
            </select></td>
          </tr>
          <tr>
            <td>邮箱：</td>
            <td><input type="email" name="email" id="email" value="{$data.email}" ></td>
          </tr>
          <tr>
            <td>QQ：</td>
            <td><input type="text" name="qq" id="qq" value="{$data.qq}" ></td>
          </tr>
          {if $data}
          <tr>
            <td>留言时间：</td>
            <td>{$data.dateline|date:Y-m-d H:m}</td>
          </tr>
          {/if}
          <tr>
            <td>留言内容：</td>
            <td><textarea name="content" id="content" style="width:98%; height:100px;">{$data.content}</textarea></td>
          </tr>
           {if $data}
          <tr>
            <td>回复内容：</td>
            <td><textarea  name="reply_content" id="reply_content"  style="width:98%; height:100px;">{$data.reply_content}</textarea></td>
          </tr>
          {/if}
         {if $data.reply_time}
          <tr>
            <td>回复时间：</td>
            <td>{$data.reply_time|date:Y-m-d H:m}</td>
          </tr>
          {/if}
          <tr>
            <td></td>
            <td><input type="submit" value="保存" class="btn btn-success"></td>
          </tr>
        </table>
      </form>
  
{include file="footer.html"}
</body>
</html>